/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { AuthPassword } from '../models/AuthPassword';
import type { Response } from '../models/Response';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class ContestControllerService {
    /**
     * getByAdmin
     * @returns Response OK
     * @throws ApiError
     */
    public static getByAdminUsingGet(): CancelablePromise<Response> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/api/contest/getByAdmin',
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
    /**
     * getByUser
     * @returns Response OK
     * @throws ApiError
     */
    public static getByUserUsingGet(): CancelablePromise<Response> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/api/contest/getByUser',
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
    /**
     * getOneById
     * @param contestId contestId
     * @returns Response OK
     * @throws ApiError
     */
    public static getOneByIdUsingGet(
        contestId: number,
    ): CancelablePromise<Response> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/api/contest/getOneById/{contestId}',
            path: {
                'contestId': contestId,
            },
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
    /**
     * getScore
     * @param contestId contestId
     * @returns Response OK
     * @returns any Created
     * @throws ApiError
     */
    public static getScoreUsingPost(
        contestId: number,
    ): CancelablePromise<Response | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/contest/getScore/{contestId}',
            path: {
                'contestId': contestId,
            },
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
    /**
     * AuthPassword
     * @param authPassword authPassword
     * @returns Response OK
     * @returns any Created
     * @throws ApiError
     */
    public static authPasswordUsingPost(
        authPassword: AuthPassword,
    ): CancelablePromise<Response | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/contest/password',
            body: authPassword,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
    /**
     * getProblemsByContestId
     * @param contestId contestId
     * @returns Response OK
     * @throws ApiError
     */
    public static getProblemsByContestIdUsingGet(
        contestId: number,
    ): CancelablePromise<Response> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/api/contest/problem/{contestId}',
            path: {
                'contestId': contestId,
            },
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
    /**
     * getProblemByContestIdAndProblemId
     * @param contestId contestId
     * @param problemId problemId
     * @returns Response OK
     * @throws ApiError
     */
    public static getProblemByContestIdAndProblemIdUsingGet(
        contestId: number,
        problemId: number,
    ): CancelablePromise<Response> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/api/contest/problem/{contestId}/{problemId}',
            path: {
                'contestId': contestId,
                'problemId': problemId,
            },
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
}
